10 REM                     PROGRAM LISTING
20 REM
30 REM      THIS IS THE CARROLL SELF RATING SCALE FOR DEPRESSION
40 REM      TEST WRITTEN BY BERNARD J. CARROLL M.D., DUKE UNIVERSITY
50 REM      PROGRAMMED BY MARVIN MILLER M.D. AND MARK GLICK
60 REM
70 REM
80 REM
90 REM
94 WIDTH 80
96 COLOR 7,1,1
98 KEY OFF
100 REM THIS SECTION CONTAINS THE QUESTION,CATEGORY, AND SIGNIFICANT ANSWER
110 DATA "I FEEL JUST AS ENERGETIC AS ALWAYS",13,N
120 DATA "I AM LOSING WEIGHT",17,Y
130 DATA "I HAVE DROPPED MANY OF MY INTERESTS AND ACTIVITIES",7,Y
140 DATA "SINCE MY ILLNESS BEGAN I HAVE COMPLETELY LOST INTEREST IN SEX",14,Y
150 DATA "I AM ESPECIALLY CONCERNED ABOUT HOW MY  BODY IS FUNCTIONING",15,Y
160 DATA "IT MUST BE OBVIOUS THAT I AM DISTURBED  AND AGITATED",9,Y
170 DATA "I AM STILL ABLE TO CARRY ON THE WORK I  AM SUPPOSED TO DO",7,N
180 DATA "I CAN CONCENTRATE EASILY WHEN READING THE PAPERS",10,N
190 DATA "GETTING TO SLEEP TAKES ME MORE THAN HALF AN HOUR",4,Y
200 DATA "I AM RESTLESS AND FIDGETY",9,Y
210 DATA "I WAKE UP MUCH EARLIER THAN I NEED TO IN THE MORNING",6,Y
220 DATA "DYING IS THE BEST SOLUTION FOR ME",3,Y
230 DATA "I HAVE A LOT OF TROUBLE WITH DIZZY AND FAINT FEELINGS",11,Y
240 DATA "I AM BEING PUNISHED FOR SOMETHING BAD IN MY PAST",2,Y
250 DATA "MY SEXUAL INTEREST IS THE SAME AS BEFORE I GOT SICK",14,N
260 DATA "I AM MISERABLE OR OFTEN FEEL LIKE CRYING",1,Y
270 DATA "I OFTEN WISH I WERE DEAD",3,Y
280 DATA "I AM HAVING TROUBLE WITH INDIGESTION",11,Y
290 DATA "I WAKE UP OFTEN IN THE MIDDLE OF THE     NIGHT",5,Y
300 DATA "I FEEL WORTHLESS AND ASHAMED ABOUT MY   SELF",2,Y
310 DATA "I AM SO SLOWED DOWN THAT I NEED HELP WITH BATHING AND DRESSING",8,Y
320 DATA "I TAKE LONGER THAN USUAL TO FALL ASLEEP AT NIGHT",4,Y
330 DATA "MUCH OF THE TIME I AM VERY AFRAID BUT DON'T KNOW THE REASON",10,Y
340 DATA "THINGS WHICH I REGRET ABOUT MY LIFE ARE BOTHERING ME",2,Y
350 DATA "I GET PLEASURE AND SATISFACTION FROM WHAT I DO",7,N
360 DATA "ALL I NEED IS A GOOD REST TO BE PERFECTLY WELL AGAIN",16,Y
370 DATA "MY SLEEP IS RESTLESS AND DISTURBED",5,Y
380 DATA "MY MIND IS AS FAST AND ALERT AS ALWAYS",8,N
390 DATA "I FEEL THAT LIFE IS STILL WORTH LIVING",3,N
400 DATA "MY VOICE IS DULL AND LIFELESS",8,Y
410 DATA "I FEEL IRRITABLE OR JITTERY",10,Y
420 DATA "I FEEL IN GOOD SPIRITS",1,N
430 DATA "MY HEART SOMETIMES BEATS FASTER THAN USUAL",11,Y
440 DATA "I THINK MY CASE IS HOPELESS",1,Y
450 DATA "I WAKE UP BEFORE MY USUAL TIME IN THE MORNING",6,Y
460 DATA "I STILL ENJOY MY MEALS AS MUCH AS USUAL",12,N
470 DATA "I HAVE TO KEEP PACING AROUND MOST OF THE TIME",9,Y
480 DATA "I AM TERRIFIED AND NEAR PANIC",10,Y
490 DATA "MY BODY IS BAD AND ROTTEN INSIDE",15,Y
500 DATA "I GOT SICK BECAUSE OF THIS BAD WEATHER  WE HAVE BEEN HAVING",16,Y
510 DATA "MY HANDS SHAKE SO MUCH THAT PEOPLE CAN  EASILY NOTICE",11,Y
520 DATA "I STILL LIKE TO GO OUT AND MEET PEOPLE",7,N
530 DATA "I THINK I APPEAR CALM ON THE OUTSIDE",9,N
540 DATA "I THINK I AM AS GOOD A PERSON AS ANYBODY ELSE",2,N
550 DATA "MY TROUBLE IS THE RESULT OF SOME SERIOUS INTERNAL DISEASE",15,Y
560 DATA "I HAVE BEEN THINKING ABOUT TRYING TO KILL MYSELF",3,Y
570 DATA "I GET HARDLY ANYTHING DONE LATELY",8,Y
580 DATA "THERE IS ONLY MISERY IN THE FUTURE FOR  ME",1,Y
590 DATA "I WORRY A LOT ABOUT MY BODILY SYMPTOMS",15,Y
600 DATA "I HAVE TO FORCE MYSELF TO EAT EVEN A LITTLE",12,Y
610 DATA "I AM EXHAUSTED MUCH OF THE TIME",13,Y
620 DATA "I CAN TELL THAT I HAVE LOST A LOT OF WEIGHT",17,Y
630 REM THIS SECTION ADMINISTERS THE TEST
640   REM     A() IS THE INDIVIDUAL CATEGORY SCORE
650   REM     B() IS THE ANSWER TO EACH OF THE 52 QUESTIONS
660   REM     F$() IS THE CATEGORY NAME
670 DIM A( 17), B( 52), F$( 17), G$( 52), H( 52), I$( 52)
680 CLEAR
683 DIM A( 17), B( 52), F$( 17), G$( 52), H( 52), I$( 52)
684 CLS:PRINT "DO YOU WANT TO:                                                                 (1) ADMINISTER THE CARROLL TEST OR                                              (2) RETRIEVE A SCORE
685 PRINT:PRINT "(3) STOP"
688 PRINT
690   INPUT N
700       IF N = 1 THEN 730
710       IF N = 2 THEN 1240
715       IF N = 3 THEN STOP
720   GOTO 680
730 PRINT:PRINT "WHAT IS THE PATIENT'S NUMBER";
740   INPUT N$
750 PRINT:PRINT "WHAT IS TODAY'S DATE ( MON/DAY/YEAR )"
760 PRINT:  INPUT DT$
762 IF DT$<>"" THEN GOTO 770
765 DT$=DATE$
770  REM      CLEAR SCREEN ( NEW PAGE )
780  FOR X = 1 TO 25
790    PRINT
800 NEXT X
810 RESTORE 30
812 FOR O=1 TO 52
818 LOCATE 1,1:FOR L=1 TO 80:PRINT CHR$(4);:NEXT L
819 LOCATE 3,10
820 PRINT "ANSWER QUESTIONS WITH Y FOR YES,N FOR NO"
825 LOCATE 5,10
830 PRINT "ANSWER IN TERMS OF HOW YOU HAVE FELT IN THE LAST FEW DAYS."
835 LOCATE 9,1:FOR L=1 TO 80:PRINT CHR$(4);:NEXT L
840 TOT=0
850 REM FOR O = 1 TO 5
860  REM  GET QUESTION, CATEGORY TO INCREMENT, SIGNIFICANT ANSWER
870     READ  Q$, I, A$
875 LOCATE 12,1:FOR L=1 TO 80:PRINT CHR$(32);:NEXT L
876 LOCATE 15,15:PRINT CHR$(32);
877 REM LOCATE 13,1:FOR L=1 TO 40:PRINT CHR$(32);:NEXT L
880 REM
890 LOCATE 12,1:PRINT Q$;
892 LOCATE 15,10:PRINT "Y,N?";
895 FOR G=1 TO 30:L$=INKEY$:NEXT G
900 P$=INKEY$ :IF P$="" THEN 900
902 IF P$="n" THEN P$="N"
904 IF P$="y" THEN P$="Y"
910 PRINT " ";P$
930      IF P$ = "Y" THEN TOT=TOT+1 : GOTO 970
940      IF P$ = "N" THEN 970
950 GOTO 890
960  REM  IS THE PATIENT'S ANSWER CLINICALLY SIGNIFICANT?
970  IF P$ = A$ THEN 1030
980 REM   GO BACK AND GET NEXT QUESTION
990 NEXT O
1000 GOTO 1090
1010  REM   ANSWER IS SIGNIFICANT!!!
1020  REM      INCREMENT CATEGORY SCORE
1030     A( I) = A( I) + 1
1040 REM SET VALUE=1, QUESTION WAS SIGNIFICANT
1050  B( O) = 1
1060  REM   GET ANOTHER QUESTION
1070  GOTO 990
1080  REM              MAKE PATIENT'S FILE
1090   OPEN "O",#1, N$
1100  REM   WRITE THE DATE OF THE TESTING IN THE FILE
1110  PRINT #1, DT$
1120  REM         WRITE THE CATEGORY SCORES TO DISK
1130 FOR X = 1 TO 17
1140    WRITE #1,A(X)
1150 NEXT X
1160 REM WRITE RESPONSES TO QUESTIONS (1=SIGNIFICANT, 0=NONSIG)
1170 FOR X = 1 TO 52
1180    WRITE #1,B(X)
1190 NEXT X
1200 PRINT #1,TOT
1210 CLOSE #1
1215 FOR T=1 TO 17:A(T)=0:NEXT T
1220 FOR I=1 TO 20 :PRINT:NEXT I:PRINT "THE TEST IS OVER":PRINT:GOTO 680
1230 REM RETRIEVE SCORES FROM DISK, PRINT SUMMARY
1240 PRINT "WHAT IS THE PATIENT'S NUMBER";
1250 INPUT N$
1260 INPUT "HOW MANY COPIES";R
1270 FOR COPIES = 1 TO R
1280 REM C IS A LINE COUNTER
1290 C = 17
1300 OPEN "I", #2, N$
1310   INPUT #2, DT$
1320 REM NEXT LINES ARE PRINTER INSTRUCTIONS
1330 LPRINT CHR$(12):REM ADVANCE TO TOP OF NEW PAGE
1340 FOR X=1 TO 5:LPRINT:NEXT X
1350 REM LPRINT CHR$(27); CHR$(106): REM ELONGATED TITLE
1360 LPRINT TAB(21)  "CARROLL SELF RATING SCALE FOR DEPRESSION"
1365 LPRINT TAB(21)  "========================================"
1370 LPRINT:LPRINT:LPRINT
1380 LPRINT "    DATE OF TEST  "; DT$;
1390 LPRINT TAB( 40) "PATIENT'S NUMBER : ";N$
1400 LPRINT
1410 FOR X =1 TO 17
1420    INPUT #2, A( X)
1430 NEXT X
1440 FOR X = 1 TO 52
1450    INPUT #2, B( X)
1460 NEXT X
1470 INPUT #2,TOT
1480 CLOSE #2
1490 REM NEXT LINES FORMAT SCALE PRINTOUTS
1500 X=0
1510 RESTORE 2320
1520 LPRINT "                              *   **"
1530 FOR W = 1 TO 9
1540    X = X + 1
1550    X$ = STR$ ( X)
1560    READ C$, M
1570    M$ = STR$( M)
1580    LPRINT "   ";X$;") ";C$;
1590    LPRINT TAB( 26) " ...";A( X);"/";M$;
1600    X = X + 1
1610    IF X=18 GOTO 1670
1620    X$ = STR$ ( X)
1630    READ C$, M
1640    M$ = STR$( M)
1650    LPRINT TAB( 39) X$;") ";C$"";
1660    LPRINT TAB( 63) " ...";A( X);"/";M$
1670 NEXT W
1680  REM   FIND TOTAL CARROLL SCORE
1690 K=0
1700 FOR X = 1 TO 17
1710    K = K + A( X)
1720 NEXT X
1730 LPRINT
1740 LPRINT
1750 LPRINT "    *  NUMBER OF QUESTIONS ANSWERED IN THE SIGNIFICANT DIRECTION"
1760 LPRINT "    ** NUMBER OF QUESTIONS IN THIS CATEGORY"
1770 LPRINT
1780 LPRINT "    TOTAL CARROLL SCORE :";K
1790 LPRINT "    A SCORE GREATER THAN 18 GENERALLY INDICATES A CLINICAL DEPRESSION
1800 LPRINT "    BELOW ARE THE QUESTIONS ANSWERED IN THE SIGNIFICANT DIRECTION"
1810 RESTORE 10000
1820 FOR L= 1 TO 52
1830     READ G$(L),H(L),I$(L)
1890 NEXT L
1900  REM   PRINT QUESTIONS, CATEGORIES, AND ANSWERS
1910 RESTORE 2320
1920 FOR Y = 1 TO 17
1930    READ F$( Y)
1940    READ I
1950 NEXT Y
1960 FOR Y = 1 TO 17
1970       X=0
1980       FOR Z = 1 TO 52
1990       IF Y=H(Z) THEN 2000 ELSE 2030
2000       Q$=G$(Z)
2010       A$=I$(Z)
2020       GOTO 2060
2030       NEXT Z
2040 NEXT Y
2050 GOTO 2390
2060 IF B( Z) = 1 THEN 2080
2070 GOTO 2030
2080 X= X + 1
2090  REM  C IS A LINE COUNTER
2100 C = C + 1
2110 IF X = 1 THEN 2160
2120 LPRINT TAB(( 80 - LEN( Q$)) / 2 ); Q$;
2130 REM
2140 LPRINT " ";A$
2142 IF A$="Y" THEN YTOT=YTOT+1
2150 GOTO 2030
2160 IF C < 40 THEN 2210
2170 C = 0
2180 FOR M = 1 TO 15
2190 LPRINT
2200 NEXT M
2210 L = ( 82- LEN( F$( Y)))/2
2220 LPRINT
2230 LPRINT TAB( L) ;F$( Y)
2240 C = C + 2
2250 LPRINT TAB( 26);
2260 FOR T = 1 TO 30
2270    LPRINT "-";
2280 NEXT T
2290 LPRINT
2300 GOTO 2120
2310    REM       CATEGORY NAMES
2320 DATA DEPRESSION,4,GUILT,4
2330 DATA SUICIDE,4,INITIAL INSOMNIA,2, MIDDLE INSOMNIA,2,DELAYED INSOMNIA,2
2340 DATA  WORK & INTERESTS,4,RETARDATION,4,AGITATION,4
2350 DATA  PSYCH. ANXIETY,4,SOMATIC ANXIETY,4,GASTROINTESTINAL,2
2360 DATA GENERAL SOMATIC,2,LIBIDO,2,HYPOCHONDRIASIS,4,LOSS OF INSIGHT,2
2370 DATA LOSS OF WEIGHT,2
2380 REM TEST FOR STEREOTYPED RESPONSES
2390 LPRINT:LPRINT
2392 YTOTN=40-YTOT:NTOT=K-YTOT:NTOTY=12-NTOT:TOTN=YTOTN+NTOT:TOTY=NTOTY+YTOT
2395 IF K    <4  THEN LPRINT "            TEST POSSIBLY INVALID-DENIES ALMOST ALL SYMPTOMS"
2397 IF K    >49 THEN LPRINT "            TEST POSSIBLY INVALID-ADMITS TO ALMOST ALL SYMPTOMS"
2400 IF TOTN >49 THEN LPRINT "            TEST POSSIBLY INVALID-ALMOST ALL 'NO' RESPONSES"
2405 IF K > 39 GOTO 2420
2410 IF TOTY >49 THEN LPRINT "            TEST POSSIBLY INVALID-ALMOST ALL 'YES' RESPONSES"
2420 LPRINT
2430 NEXT COPIES
2440 CLEAR: GOTO 670
10000 REM THIS SECTION CONTAINS THE QUESTION,CATEGORY, AND SIGNIFICANT ANSWER
10010 DATA "I feel just as energetic as always",13,N
10020 DATA "I am losing weight",17,Y
10030 DATA "I have dropped many of my interests and activities",7,Y
10040 DATA "Since my illness began I have completely lost interest in sex",14,Y
10050 DATA "I am especially concerned about how my body is functioning",15,Y
10060 DATA "It must be obvious that I am disturbed and agitated",9,Y
10070 DATA "I am still able to carry on the work I am supposed to do",7,N
10080 DATA "I can concentrate easily when reading the papers",10,N
10090 DATA "Getting to sleep takes me more than half an hour",4,Y
10100 DATA "I am restless and fidgety",9,Y
10110 DATA "I wake up much earlier than I need to in the morning",6,Y
10120 DATA "Dying is the best solution for me",3,Y
10130 DATA "I have a lot of trouble with dizzy and faint feelings",11,Y
10140 DATA "I am being punished for something bad in my past",2,Y
10150 DATA "My sexual interest is the same as before I got sick",14,N
10160 DATA "I am miserable or often feel like crying",1,Y
10170 DATA "I often wish I were dead",3,Y
10180 DATA "I am having trouble with indigestion",11,Y
10190 DATA "I wake up often in the middle of the night",5,Y
10200 DATA "I feel worthless and ashamed about my self",2,Y
10210 DATA "I am so slowed down that I need help with bathing and dressing",8,Y
10220 DATA "I take longer than usual to fall asleep at night",4,Y
10230 DATA "Much of the time I am very afraid but don't know the reason",10,Y
10240 DATA "Things which I regret about my life are bothering me",2,Y
10250 DATA "I get pleasure and satisfaction from what I do",7,N
10260 DATA "All I need is a good rest to be perfectly well again",16,Y
10270 DATA "My sleep is restless and disturbed",5,Y
10280 DATA "My mind is as fast and alert as always",8,N
10290 DATA "I feel that life is still worth living",3,N
10300 DATA "My voice is dull and lifeless",8,Y
10310 DATA "I feel irritable or jittery",10,Y
10320 DATA "I feel in good spirits",1,N
10330 DATA "My heart sometimes beats faster than usual",11,Y
10340 DATA "I think my case is hopeless",1,Y
10350 DATA "I wake up before my usual time in the morning",6,Y
10360 DATA "I still enjoy my meals as much as usual",12,N
10370 DATA "I have to keep pacing around most of the time",9,Y
10380 DATA "I am terrified and near panic",10,Y
10390 DATA "My body is bad and rotten inside",15,Y
10400 DATA "I got sick because of this bad weather we have been having",16,Y
10410 DATA "My hands shake so much that people can easily notice",11,Y
10420 DATA "I still like to go out and meet people",7,N
10430 DATA "I think I appear calm on the outside",9,N
10440 DATA "I think I am as good a person as anybody else",2,N
10450 DATA "My trouble is the result of some serious internal disease",15,Y
10460 DATA "I have been thinking about trying to kill myself",3,Y
10470 DATA "I get hardly anything done lately",8,Y
10480 DATA "There is only misery in the future for me",1,Y
10490 DATA "I worry a lot about my bodily symptoms",15,Y
10500 DATA "I have to force myself to eat even a little",12,Y
10510 DATA "I am exhausted much of the time",13,Y
10520 DATA "I can tell that I have lost a lot of weight",17,Y
11000 END
                                                                    